<?php
if ($model->dealId != null)

	$this->breadcrumbs=array(
		'Deals'=>array('deal/admin'),
		$model->deal->referenceNo=>array('deal/view','id'=>$model->dealId),
		'Loans',
		'#'.$model->id,
	);

else
	$this->breadcrumbs=array(
		'Loans',
		'#'.$model->id,
	);
	

$this->menu=array(
	array('label'=>'Update Loan', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Loan', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this loan?')),
);

if ($model->dealId != null) {
	$this->menu[] = array('label'=>'Add Loan', 'url'=>array('create', 'dealId'=>$model->dealId));
}
?>

<h1>View Loan #<?php echo $model->id; ?> <?php if($model->dealId != null) echo 'of Deal '.$model->deal->referenceNo;?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>CMap::mergeArray(array(
		'id',
		'bank',
		'amount',
		'settlementDate',
		'rate',
		'productName',
		'pricing',
		'honeymoonDate',
		'dischargeDate',
		'loanAccountBSB', 
		'loanAccountNo', 
		'savingAccountBSB', 
		'savingAccountNo',


		'securityAddress',
		'securitySuburb',
		'securityPostcode',
		'securityState',
		'securityCountry',

		'securityAddress2',
		'securitySuburb2',
		'securityPostcode2',
		'securityState2',
		'securityCountry2',


		'securityAddress3',
		'securitySuburb3',
		'securityPostcode3',
		'securityState3',
		'securityCountry3',


		'createDate',
		'settlementReviewed:boolean',
		'settlementReviewComments',
		'commissionPaid:boolean',
		'note',
	),GlobalConfiguration::isManageMode()?array('hidden:boolean'):array()),
)); ?>
